import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/vuex/store'
import './plugins/elements'

Vue.config.productionTip = false

// Vue.prototype.$bus = new Vue()

new Vue({
  beforeCreate () {
    Vue.prototype.$bus = this // 让所有组件对象都可以看到
  },

  render: h => h(App),
  router,
  store, // 所有组件都能通过$store得到store对象
}).$mount('#app')


/* 
store
  state
  getters

  commit() ==> mutation调用
  dispatch()  ==> action调用

*/